<!DOCTYPE HTML>

<html>
<head>
   <script src="JS/raphael-min.js"></script>

   <script>
         function doAnimation() {
            console.log("Inizio");
            var p = Raphael( document.getElementById('container'), 1200,500 );
            console.log( p ); 
            var pa = p.path(";M0,250L5,255L5,245L5,250");
            pa.attr("stroke","yellow");
            pa.attr("fill","red");

            var anim = Raphael.animation( { path : "M0,250L1200,0L1200,500L0,250", fill: "yellow", 'fill-opacity' : 0.2 } , 1000, '<>' );
           pa.animate( anim ); 
        }

        window.onload=function() { 
            doAnimation(); 
        }

   </script>

   <style>
        #container { border-style: solid; border-color: blue; }
    </style>
</head>

<body>
    <div id="container">
</body>
</html>
